<template>
  <van-row class="sheader-box">
    <h4>乐吧</h4>
    <van-col @click.native="onInputBox" class="input-box">
      <input type="button" value="搜索">
      <van-icon class="input-icon" name="search" />
    </van-col>
    <van-icon size="24" class="user-icon" name="user-circle-o" />
  </van-row>
</template>

<script>
export default {
  computed: {
  },
  methods: {
    onInputBox () {
      // 点击搜索面板
      this.$store.commit('search/setShowSearchPanel', true)
    }
  }
}
</script>

<style lang="scss">
@import "@/assets/style/global.scss";

.sheader-box {
  position: relative;
  width: 100%;
  height: 48px;
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1PX solid rgba(0,0,0,.05);
  box-sizing: border-box;
  clear: both;
  justify-content: space-evenly;
  h4 {
    width: 64px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
  }
  .input-box {
    width: 240px;
    border-radius: 16px;
    margin-right: 32px;
    box-sizing: border-box;
    background: rgba(0,0,0,.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    input {
      text-align: center;
      padding: 6px;
      outline: none;
      border: none;
      background:transparent;
      font-size: 14px;
    }
  }
  .user-icon {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 10;
  }
}
</style>
